{% extends "layout.html" %}

    {% block content %}
        <div class="container">
            <div style="margin-bottom: 10px">
                <h4>
                     <a class="btn-success" href="/depart/add/">
                        <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
                        添加院系
                    </a>
                </h4>
            </div>

            <div>
                <div class="panel panel-default">
                    <!--面板头-->
                    <div class="panel-heading">
                        <span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
                        院系列表
                    </div>
                    <!--数据区域-->
                    <table class="table table-bordered">
                        <thead>
                          <tr>
                            <th>院系序号</th>
                            <th>院系名称</th>
                            <th>操作</th>
                          </tr>
                        </thead>
                        <tbody>
                            {% for depart in departs %}
                              <tr>
                                <td>{{ depart.id }}</td>
                                <td>{{ depart.title }}</td>
                                <td>
                                    <a class="btn btn-primary btn-xs" href="/depart/update/?did={{ depart.id }}">编辑</a>
                                    <a class="btn btn-danger btn-xs" href="/depart/delete/?did={{ depart.id }}">删除</a>
                                </td>
                              </tr>
                            {% endfor %}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    {% endblock %}
